package com.test.netty.runner;

import com.test.netty.ws.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 启动WsServer
 */
@Component
@Order(1)
public class NettyRunner implements CommandLineRunner {

    @Autowired
    private Server server;

    @Override
    public void run(String... args) throws Exception {
        server.start(10000);
    }
}
